import React, { Component } from "react";
import {
    StyleSheet,
    Text,
    View,
    ScrollView,
    Image,
    Animated,
    DeviceEventEmitter,
    Platform,
    NativeAppEventEmitter,
    TouchableOpacity,
    Modal,
    Button,
    NetInfo,
    Linking,
    NativeModules,
    BackHandler,
    ProgressBarAndroid,
    AppState
} from "react-native";
import styles from "./indexStyle";
import api from "../../services/api";
import Touch from "../global/Touch";
import RNFS from "react-native-fs";
import ToastTip from '../global/ToastTip';

class orderRewardDialog extends Component{
    constructor(props) {
        super(props);
        // console.log(this.props.lastVersionInfo,'sadasdasversioninfo')
        this.state = {
            // isSetting: false,
            // progressNum: 0,
            // isMust: false,
            // isDownloading: false,
            // isError: false,
            // currentAppState:AppState.currentState,
            // bLength:0
        };
    }

    componentWillReceiveProps(nextProps) {
        // this.setState({isMust:nextProps.lastVersionInfo.forceUpdate});
    }

    componentDidMount() {
        
    }

    render() {
        let { showModal, onClickCancelButton ,onClickConfirmButton} = this.props;
        // let { isSetting, isMust, isDownloading, isError } = this.state;

        return (
            <Modal
                animationType={"fade"}
                transparent={true}
                visible={showModal}
                onRequestClose={() => {
                    // closeModal();
                }}
            >
                <View
                    style={{
                        backgroundColor: "#000000BB",
                        flex: 1,
                        justifyContent: "center",
                        alignItems: "center",
                    }}
                >
                    <View style={{backgroundColor:'#ffffff',height:217,flexDirection:'column',marginLeft: 30,marginRight:30,width:'85%'}}>
                        <View style={{
                                justifyContent:'center',
                                alignItems:'center',
                                padding: 12,
                            }}>
                            <Text
                                style={{
                                    fontSize:15,
                                    color:'#565656',
                                }}>温馨提示</Text>
                        </View>
                        <View style={{height:0.5,backgroundColor:'#DDDDDD'}}></View>
                        <View style={{
                                justifyContent:'center',
                                alignItems:'center',
                                paddingTop: 40,
                                paddingBottom: 40,
                            }}>
                            <Text style={{
                                fontSize:15,
                                color:'#878787',
                            }}>
                                您有服务协议待签约
                            </Text>
                            <Text style={{
                                fontSize:15,
                                color:'#878787',
                            }}>
                                请前往账户我的签约查看
                            </Text>
                        </View>
                        <View style={{height:0.5,backgroundColor:'#DDDDDD'}}></View>
                        <View style={{
                            flex:1,
                            flexDirection:'row',
                        }}>
                            <TouchableOpacity
                                activeOpacity={0.8}
                                onPress={onClickCancelButton}
                                style={{flex:1,alignItems:'center',justifyContent:'center'}}
                            >
                                
                                <Text style={{color:'#565656',fontSize:15}}>取消</Text>

                            </TouchableOpacity>
                                <View style={{
                                    width:0.5,
                                    backgroundColor:'#DDDDDD'
                                }}></View>
                            <TouchableOpacity
                                activeOpacity={0.8}
                                onPress={onClickConfirmButton}
                                style={{flex:1,alignItems:'center',justifyContent:'center'}}
                            >
                                
                                <Text style={{color:'#EA5404',fontSize:15}}>立即签约</Text>

                            </TouchableOpacity>
                        </View>

                        
                    </View>


















                    
                    
                </View>
                
            </Modal>
        );
    }
}


export default orderRewardDialog;
